package com.css.casualties.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.css.casualties.entity.GridDestoryDetails;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Dbj
 * @date 2024年09月20日  14:16
 */
@Mapper
public interface GridDestoryDetailsMapper extends BaseMapper<GridDestoryDetails> {
    @Select("SELECT id,earth_quake_id,influence_version,structure_type,intensity,basic_area,slight_area,mid_area,serious_area,destory_area,geom,st_astext(geom) as geomText FROM basic_casulaties_destroy_details WHERE (earth_quake_id = #{earthQuakeId}) and influence_version=#{influenceVersion}")
    List<GridDestoryDetails> getAll(@Param("earthQuakeId") String earthQuakeId, @Param("influenceVersion")String influenceVersion);
}
